<html>
<head><meta charset="utf-8"><title>Playground dependency build mode · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html">Playground dependency build mode</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212250084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Playground%20dependency%20build%20mode/near/212250084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html#212250084">(Oct 05 2020 at 01:04)</a>:</h4>
<p>Now that we can choose to build dependencies with a different optimization level than the current crate, would it make sense for the playground to build all dependencies in release mode all the time?</p>



<a name="212254446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Playground%20dependency%20build%20mode/near/212254446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html#212254446">(Oct 05 2020 at 03:11)</a>:</h4>
<p>they should build with a higher opt-level perhaps, but still with debug_assertions on or off according to the user's build setting</p>



<a name="212300550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Playground%20dependency%20build%20mode/near/212300550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html#212300550">(Oct 05 2020 at 13:44)</a>:</h4>
<p>That'd be the most unfortunate outcome from my perspective, sadly. I was hoping I could get away with building the dependencies once instead of twice. That would mean build them twice but with a slower build both times <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="212321131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Playground%20dependency%20build%20mode/near/212321131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html#212321131">(Oct 05 2020 at 16:07)</a>:</h4>
<p>meh, just do opt+debug_assertions and call it a day</p>



<a name="212321145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Playground%20dependency%20build%20mode/near/212321145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html#212321145">(Oct 05 2020 at 16:07)</a>:</h4>
<p>you're not building production code here</p>



<a name="212327577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Playground%20dependency%20build%20mode/near/212327577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html#212327577">(Oct 05 2020 at 16:59)</a>:</h4>
<p>The only problem there would be people who use playground to look at optimized ASM, but maybe they shouldn't be doing that with dependencies anyway.</p>



<a name="212366398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Playground%20dependency%20build%20mode/near/212366398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Elichai Turkel <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Playground.20dependency.20build.20mode.html#212366398">(Oct 05 2020 at 22:56)</a>:</h4>
<p>There's also the use case of comparing debug and release ASMs and sometimes even behavior (usually when there's a compiler bug or UB involved)<br>
But I personally go to godbolt in these cases, and you also just talk about deps but it might even make things weirder for those use cases<br>
(and godbolt doesn't have dependencies support AFAIK)</p>
<p>EDIT: I realize now that it sounds similar to what <span class="user-mention" data-user-id="125270">@scottmcm</span> but I'm more centered around different behavior in debug VS release, not just asm</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>